import { expect, test } from "vitest"
import { sortBranches } from "../../src/configurators/BranchConfigurator"

test("sort branches", () => {
  const branches = [
    "abubenchikov/maven-cache-interpolation",
    "abubenchikov/maven-only-root-poms",
    "akoehler/233_additional_logging_for_IDEA-242343",
    "akoehler/with_akuznezov_6271d740e94a",
    "alexey.kryuchkov/checkout-with-disabled-mapping",
    "master",
    "semantic-search-perf-impact-with-actions",
    "alexey.kryuchkov/investigate-storing-time",
    "alexey.kryuchkov/spans-with-the-samename-test",
    "yaroshchuk/IJI-1297-perf-tests",
    "yartamonov/crazy-visitors",
    "alexey.kryuchkov/trying-to-reset-all-branches-bycommit-hash",
    "cheremin/fast-file-attributes-over-mmapped-file",
    "dz/vcs-log-loading-details-separate-statistics-current-scope",
    "cheremin/IJPL-193-enable-new-filepagecache",
    "cheremin/vfs-enable-fast-names-enumerator",
    "cheremin/vfs-refactoring",
    "db/in-memory-indexes",
    "dz/git-branches-popup-building-tree-span",
    "231",
    "232",
    "233",
    "dz/vcs-log-loading-details-end-span-before-process-wait",
    "dz/vcs-log-loading-details-separate-statistics",
    "alexey.kryuchkov/investigate-multiple-scheduling",
    "dz/vcs-log-loading-details-without-processing-tests",
    "gliullin/fix-class-names-in-perfomance-tests",
    "gliullin/VS-1490/VS-1490/do-not-perform-synchronous-refresh-under-read-lock",
    "gliullin/VS-1591/do-not-perform-synchronous-refresh-under-read-lock",
    "gregsh/actions",
    "lena/indexingStampRevertExperiment",
    "lena/indexingTestIndexingStampInvestigation",
    "maxim.kolmakov/1s-recent-files",
    "maxim.kolmakov/500-lines-intellij-preloading",
    "maxim.kolmakov/5000-lines-and-5-seconds",
    "maxim.kolmakov/5000-lines-limit",
    "maxim.kolmakov/disable-OT",
    "msokolov/idea-314818-3",
    "msokolov/idea-314818-4",
    "msokolov/idea-314818-5",
    "nikita.barkov/16_09_maven_degradation_after",
    "nikita.barkov/maven_degradation_investigation_before",
    "nikita.barkov/maven_degradation_with_suspect",
    "nikita.barkov/maven_import_before_fixed_flag",
    "plate/caches",
    "plate/changelog",
    "plate/disabledCaches",
    "plate/squashHarder",
    "shagvaliev/package-checker-refactor",
    "vadim.salavatov/IJPL-52-optimization-baseline",
    "vadim.salavatov/IJPL-52-optimization-baseline-low",
    "vadim.salavatov/IJPL-52-optimize-no-workers",
    "wsm/sdk_wip",
    "semantic-search-perf-impact-with-all-together",
  ].sort(sortBranches)
  expect(branches).toStrictEqual([
    "master",
    "233",
    "232",
    "231",
    "abubenchikov/maven-cache-interpolation",
    "abubenchikov/maven-only-root-poms",
    "akoehler/233_additional_logging_for_IDEA-242343",
    "akoehler/with_akuznezov_6271d740e94a",
    "alexey.kryuchkov/checkout-with-disabled-mapping",
    "alexey.kryuchkov/investigate-multiple-scheduling",
    "alexey.kryuchkov/investigate-storing-time",
    "alexey.kryuchkov/spans-with-the-samename-test",
    "alexey.kryuchkov/trying-to-reset-all-branches-bycommit-hash",
    "cheremin/fast-file-attributes-over-mmapped-file",
    "cheremin/IJPL-193-enable-new-filepagecache",
    "cheremin/vfs-enable-fast-names-enumerator",
    "cheremin/vfs-refactoring",
    "db/in-memory-indexes",
    "dz/git-branches-popup-building-tree-span",
    "dz/vcs-log-loading-details-end-span-before-process-wait",
    "dz/vcs-log-loading-details-separate-statistics",
    "dz/vcs-log-loading-details-separate-statistics-current-scope",
    "dz/vcs-log-loading-details-without-processing-tests",
    "gliullin/fix-class-names-in-perfomance-tests",
    "gliullin/VS-1490/VS-1490/do-not-perform-synchronous-refresh-under-read-lock",
    "gliullin/VS-1591/do-not-perform-synchronous-refresh-under-read-lock",
    "gregsh/actions",
    "lena/indexingStampRevertExperiment",
    "lena/indexingTestIndexingStampInvestigation",
    "maxim.kolmakov/1s-recent-files",
    "maxim.kolmakov/500-lines-intellij-preloading",
    "maxim.kolmakov/5000-lines-and-5-seconds",
    "maxim.kolmakov/5000-lines-limit",
    "maxim.kolmakov/disable-OT",
    "msokolov/idea-314818-3",
    "msokolov/idea-314818-4",
    "msokolov/idea-314818-5",
    "nikita.barkov/16_09_maven_degradation_after",
    "nikita.barkov/maven_degradation_investigation_before",
    "nikita.barkov/maven_degradation_with_suspect",
    "nikita.barkov/maven_import_before_fixed_flag",
    "plate/caches",
    "plate/changelog",
    "plate/disabledCaches",
    "plate/squashHarder",
    "shagvaliev/package-checker-refactor",
    "vadim.salavatov/IJPL-52-optimization-baseline",
    "vadim.salavatov/IJPL-52-optimization-baseline-low",
    "vadim.salavatov/IJPL-52-optimize-no-workers",
    "wsm/sdk_wip",
    "yaroshchuk/IJI-1297-perf-tests",
    "yartamonov/crazy-visitors",
    "semantic-search-perf-impact-with-actions",
    "semantic-search-perf-impact-with-all-together",
  ])
})
